<template>
  <div>
    <doc-show
      :docpath="docpath"
      :mode="mode"
      :menuFlag="menuFlag"
      :doctype="doctype"
    ></doc-show>
  </div>
</template>

<script>
import { useRouter } from "vue-router";
import DocShow from '@/components/DocShow/DocShow'

export default {
  components:{
    DocShow
  },
  setup() {
    //router是全局路由对象，route=userRoute()是当前路由对象
    //通过路由传参数获取路径打开内容
    const route = useRouter();
    var query = route.currentRoute.value.query;
    var docpath = query.docpath;
    var doctype = query.doctype ? Number(query.doctype) : 1;
    var menuFlag = query.menuFlag;
    if(!menuFlag) menuFlag=false;
    var mode = 1;
    if(doctype==1)mode=1;
    else if(doctype==2)mode=2;

    return {
      docpath,
      doctype,
      mode,
      menuFlag
    };
  },
  data() {
    return {
    }
  },
  mounted(){
  },
  methods:{

  }
}
</script>

<style>
</style>